﻿using Business;
using SqliteDataAccess;
using System;
using System.Collections.Generic;
using System.Text;

namespace MVP
{
    public class MainFormPresenter : BasePresenter<IMainFormView>
    {
        private IMainFormView _view;
        public IDictionary<String, Object> States { get; set; }

        public MainFormPresenter(IMainFormView view)
            : base(view)
        {
            this._view = view;
            States = new Dictionary<String, Object>();
        }

        public bool IsProductActivated()
        {
            AktivasiBusiness aktivasiBusiness = new AktivasiBusiness();
            return aktivasiBusiness.IsActivated();
        }

        public bool IsProfileSet()
        {
            SqliteDataManager.ProfilSekolahRow profil = new ProfilBusiness().GetProfil();
            return !(profil.IsNull("id") || profil.Isketua_yayasanNull() || profil.IssekolahNull() ||
                profil.Iskepala_sekolahNull() || profil.Isbendahara_sekolahNull());
        }
    }
}
